<form action="" method="post" enctype="multipart/form-data" id="form_submit" class="form_submit">
  {if $smarty.get.type eq "edit"}
  	<input type="hidden" name="type" value="editt" />
    <input type="hidden" name="id" value="{$smarty.get.pageid}" />
  {else}
  	<input type=hidden name="type" value="add" />
  {/if}
  
  <input type="hidden" name="parent" value="{$smarty.get.id}" />
  <div id="admin_tabs_main_content"> 
    <!-- TABS_NAME -->
    <ul>
      <li><a href="#General">Общие</a></li>
      <li><a href="#SEO">SEO</a></li>
      <li><a href="#Files">Файлы</a></li>
      <li><a href="#Steidzh">Стейдж</a></li>
    </ul>
    <!-- END TABS_NAME --> 
    <!-- ОБЩИЕ -->
    <div id="dialog-form-alert"></div>
    <div id="General" style="width:730px;">  
      {if $smarty.get.type eq "edit"}
        <p class="position_name">Запись создана</p>
        <p class="position_input">{$Field.date_create}<input type="hidden" name="date_create" value="{$Field.date_create}" /></p>
        
        <p class="position_name">Запись обновлена</p>
        <p class="position_input">{$Field.date_update}</p>	
      {/if}
      
      <p class="position_name">Порядок</p>
      <p class="position_input"><input type="text" name="por" value="{$Field.por}" class="por-field"></p>   

      <p class="position_name">Активна</p>
      <p class="position_input"><input type="checkbox" class="mini-switch" name="show" value="1"{if $Field.show} checked="checked"{/if} /></p>         
              
      <p class="position_name">Название</p>
      <p class="position_input"><input type="text" name="name" value="{$Field.name}" class="name" style="width:670px"> <input type="checkbox" class="mini-switch" name="is_header" value="1"{if $Field.is_header} checked="checked"{/if} /></p>
      
      <p class="position_name">Системное имя</p>
      <p class="position_input"><input type="text" name="sys_name" value="{$Field.sys_name}" class="sys_name"></p>
      
      <p class="position_name">Короткое описание</p>
      <p class="position_input"><textarea name="stext" rows="5">{$Field.stext}</textarea></p>      
      
      <p class="position_name">Описание</p>
      <p class="position_input"><textarea name="btext" rows="5" class="elrte_wo">{$Field.btext}</textarea></p>  
    </div>
    <div id="SEO" style="width:730px;">
      <p class="position_name">Title</p>
      <p class="position_input"><textarea name="title" id="textform1" rows="3">{$Field.title}</textarea><div id="charlimitinfo1"></div></p>
      
      <p class="position_name">Description</p>
      <p class="position_input"><textarea name="description" id="textform2" rows="3">{$Field.description}</textarea><div id="charlimitinfo2"></div></p>
      
      <p class="position_name">Keywords</p>
      <p class="position_input"><textarea name="keywords" id="textform3" rows="3">{$Field.keywords}</textarea><div id="charlimitinfo3"></div></p>
    </div>  
    <div id="Files">    
      {$IMAGE}
    </div>
    
    <div id="Steidzh"> 
      <p class="position_name">Текст</p>
      <p class="position_input"><textarea name="text_steidzh" rows="5" class="elrte_wo">{$Field.text_steidzh}</textarea></p>   
      {$STEIDZH}
    </div>    
    
  </div>
  <div id="posbutton">
    <a href="javascript:void(0);" class="ui_wo_buttons but_primenit ui-state-default ui-corner-all"><span class="ui-icon ui-icon-refresh"></span>Применить</a> 
    <a href="javascript:void(0);" class="ui_wo_buttons but_save ui-state-default ui-corner-all"><span class="ui-icon ui-icon-disk"></span>Сохранить</a>
  </div>
</form>
<script type="text/javascript">
$(function()
{
	$(".name").GoogleTranslate("{$TABLE}", {$ID_ACTION});
	var eForm = $("#form_submit");
	$(".but_primenit").live("click", function(){
		eForm.attr("action", '?m=content&id={$smarty.get.id}&parent={$smarty.get.parent}&pageid={$ID_ACTION}&type=edit').submit();		
	});		
	$(".but_save").live("click", function(){
		eForm.attr("action", '?m=content&id={$smarty.get.id}&parent={$smarty.get.parent}').submit();
	});	
});
</script>